<?php
namespace app\common\model;

class Calendar extends Base
{
    /**
     * 获取应出勤天数
     */
    public static function getCheckDay($time)
    {
        list($year, $month) = explode('-', date('Y-m', $time));
        return self::where([['status', 'in', [1,4]], ['g_year', '=', $year], ['g_month', '=', $month]])->count();
    }
}